import Vue from 'vue'
import Vuex from 'vuex'

import mutations from './mutations.js'
import actions from  './actions.js'
// 记得在次出导入你要的getters 不然...mapGetter是不起作用的
import getters from './getters.js'
//1. 安装插件
Vue.use(Vuex)
// 2.创建store对象
const state = {
   cartList : []
}

const store = new Vuex.Store({
  state,
  mutations,
  actions,
  getters
})

export default store;
